Garbage collection is widely acknowledged to speed up software development while increasing security and reliability. Garbage collection has been incorporated into modern popular languages such as C# or Java. However, garbage collectors may create pauses in the execution of the application, and they may add overhead that reduces efficiency.
When garbage collection was first proposed and implemented, the running software application was halted during garbage collection execution. These halts create pauses which may ultimately affect end users, particularly in a real-time operating system or when presenting a multimedia file.
Concurrent and on-the-fly garbage collectors may partially mitigate these pauses. Concurrent garbage collectors run concurrently with the application and only stop it for a short synchronization phase in the beginning or end of the collection. On-the-fly collectors are special concurrent collectors that do not need to stop all threads simultaneously. They stop the application one thread at a time, typically for scanning the thread runtime stack. However, for some modern on-the-fly garbage collectors, the remaining pause bottleneck is the stack scanning of a single thread, thus pauses may still occur.